package com.fishleap.sqlSession;

import com.fishleap.pojo.Configuration;

/**
 * @author zlg
 * @create 2020-04-22 0:34
 */
public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }


    /**
     * 需要将configuration对象依次传递
     */
    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration);
    }
}
